# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.PlayMoviesPartner.V1.Model.Avail do
  @moduledoc """
  An Avail describes the Availability Window of a specific Edit in a given country, which means the period Google is allowed to sell or rent the Edit.  Avails are exposed in EMA format Version 1.6b (available at http://www.movielabs.com/md/avails/)  Studios can see the Avails for the Titles they own. Post-production houses cannot see any Avails.

  ## Attributes

  - altId (String): Other identifier referring to the Edit, as defined by partner. Example: \&quot;GOOGLER_2006\&quot; Defaults to: `null`.
  - availId (String): ID internally generated by Google to uniquely identify an Avail. Not part of EMA Specs. Defaults to: `null`.
  - captionExemption (String): Communicating an exempt category as defined by FCC regulations. It is not required for non-US Avails. Example: \&quot;1\&quot; Defaults to: `null`.
  - captionIncluded (Boolean): Communicating if caption file will be delivered. Defaults to: `null`.
  - contentId (String): Title Identifier. This should be the Title Level EIDR. Example: \&quot;10.5240/1489-49A2-3956-4B2D-FE16-5\&quot;. Defaults to: `null`.
  - displayName (String): The name of the studio that owns the Edit referred in the Avail. This is the equivalent of &#x60;studio_name&#x60; in other resources, but it follows the EMA nomenclature. Example: \&quot;Google Films\&quot;. Defaults to: `null`.
  - encodeId (String): Manifestation Identifier. This should be the Manifestation Level EIDR. Example: \&quot;10.2340/1489-49A2-3956-4B2D-FE16-7\&quot; Defaults to: `null`.
  - end (String): End of term in YYYY-MM-DD format in the timezone of the country of the Avail. \&quot;Open\&quot; if no end date is available. Example: \&quot;2019-02-17\&quot; Defaults to: `null`.
  - episodeAltId (String): Other identifier referring to the episode, as defined by partner. Only available on TV avails. Example: \&quot;rs_googlers_s1_3\&quot;. Defaults to: `null`.
  - episodeNumber (String): The number assigned to the episode within a season. Only available on TV Avails. Example: \&quot;3\&quot;. Defaults to: `null`.
  - episodeTitleInternalAlias (String): OPTIONAL.TV Only. Title used by involved parties to refer to this episode. Only available on TV Avails. Example: \&quot;Coding at Google\&quot;. Defaults to: `null`.
  - formatProfile (String): Indicates the format profile covered by the transaction. Defaults to: `null`.
    - Enum - one of [FORMAT_PROFILE_UNSPECIFIED, SD, HD, UHD]
  - licenseType (String): Type of transaction. Defaults to: `null`.
    - Enum - one of [LICENSE_TYPE_UNSPECIFIED, EST, VOD, SVOD, POEST]
  - pphNames (List[String]): Name of the post-production houses that manage the Avail. Not part of EMA Specs. Defaults to: `null`.
  - priceType (String): Type of pricing that should be applied to this Avail based on how the partner classify them. Example: \&quot;Tier\&quot;, \&quot;WSP\&quot;, \&quot;SRP\&quot;, or \&quot;Category\&quot;. Defaults to: `null`.
  - priceValue (String): Value to be applied to the pricing type. Example: \&quot;4\&quot; or \&quot;2.99\&quot; Defaults to: `null`.
  - productId (String): Edit Identifier. This should be the Edit Level EIDR. Example: \&quot;10.2340/1489-49A2-3956-4B2D-FE16-6\&quot; Defaults to: `null`.
  - ratingReason (String): Value representing the rating reason. Rating reasons should be formatted as per [EMA ratings spec](http://www.movielabs.com/md/ratings/) and comma-separated for inclusion of multiple reasons. Example: \&quot;L, S, V\&quot; Defaults to: `null`.
  - ratingSystem (String): Rating system applied to the version of title within territory of Avail. Rating systems should be formatted as per [EMA ratings spec](http://www.movielabs.com/md/ratings/) Example: \&quot;MPAA\&quot; Defaults to: `null`.
  - ratingValue (String): Value representing the rating. Ratings should be formatted as per http://www.movielabs.com/md/ratings/ Example: \&quot;PG\&quot; Defaults to: `null`.
  - releaseDate (String): Release date of the Title in earliest released territory. Typically it is just the year, but it is free-form as per EMA spec. Examples: \&quot;1979\&quot;, \&quot;Oct 2014\&quot; Defaults to: `null`.
  - seasonAltId (String): Other identifier referring to the season, as defined by partner. Only available on TV avails. Example: \&quot;rs_googlers_s1\&quot;. Defaults to: `null`.
  - seasonNumber (String): The number assigned to the season within a series. Only available on TV Avails. Example: \&quot;1\&quot;. Defaults to: `null`.
  - seasonTitleInternalAlias (String): Title used by involved parties to refer to this season. Only available on TV Avails. Example: \&quot;Googlers, The\&quot;. Defaults to: `null`.
  - seriesAltId (String): Other identifier referring to the series, as defined by partner. Only available on TV avails. Example: \&quot;rs_googlers\&quot;. Defaults to: `null`.
  - seriesTitleInternalAlias (String): Title used by involved parties to refer to this series. Only available on TV Avails. Example: \&quot;Googlers, The\&quot;. Defaults to: `null`.
  - start (String): Start of term in YYYY-MM-DD format in the timezone of the country of the Avail. Example: \&quot;2013-05-14\&quot;. Defaults to: `null`.
  - storeLanguage (String): Spoken language of the intended audience. Language shall be encoded in accordance with RFC 5646. Example: \&quot;fr\&quot;. Defaults to: `null`.
  - suppressionLiftDate (String): First date an Edit could be publically announced as becoming available at a specific future date in territory of Avail. *Not* the Avail start date or pre-order start date. Format is YYYY-MM-DD. Only available for pre-orders. Example: \&quot;2012-12-10\&quot; Defaults to: `null`.
  - territory (String): ISO 3166-1 alpha-2 country code for the country or territory of this Avail. For Avails, we use Territory in lieu of Country to comply with EMA specifications. But please note that Territory and Country identify the same thing. Example: \&quot;US\&quot;. Defaults to: `null`.
  - titleInternalAlias (String): Title used by involved parties to refer to this content. Example: \&quot;Googlers, The\&quot;. Only available on Movie Avails. Defaults to: `null`.
  - videoId (String): Google-generated ID identifying the video linked to this Avail, once delivered. Not part of EMA Specs. Example: &#39;gtry456_xc&#39; Defaults to: `null`.
  - workType (String): Work type as enumerated in EMA. Defaults to: `null`.
    - Enum - one of [TITLE_TYPE_UNSPECIFIED, MOVIE, SEASON, EPISODE, BUNDLE]
  """

  defstruct [
    :"altId",
    :"availId",
    :"captionExemption",
    :"captionIncluded",
    :"contentId",
    :"displayName",
    :"encodeId",
    :"end",
    :"episodeAltId",
    :"episodeNumber",
    :"episodeTitleInternalAlias",
    :"formatProfile",
    :"licenseType",
    :"pphNames",
    :"priceType",
    :"priceValue",
    :"productId",
    :"ratingReason",
    :"ratingSystem",
    :"ratingValue",
    :"releaseDate",
    :"seasonAltId",
    :"seasonNumber",
    :"seasonTitleInternalAlias",
    :"seriesAltId",
    :"seriesTitleInternalAlias",
    :"start",
    :"storeLanguage",
    :"suppressionLiftDate",
    :"territory",
    :"titleInternalAlias",
    :"videoId",
    :"workType"
  ]
end

defimpl Poison.Decoder, for: GoogleApi.PlayMoviesPartner.V1.Model.Avail do
  def decode(value, _options) do
    value
  end
end

defimpl Poison.Encoder, for: GoogleApi.PlayMoviesPartner.V1.Model.Avail do
  def encode(value, options) do
    GoogleApi.PlayMoviesPartner.V1.Deserializer.serialize_non_nil(value, options)
  end
end

